<?php
//
// +------------------------------------------------------------------------+
// | Gecko Framework                                                        |
// +------------------------------------------------------------------------+
//

/**
 * Object for returning Form Results
 *
 * @package Gecko.Form;
 * @author Christopher Valderrama <valderrama.christopher@gmail.com>
 * @copyright Copyright (c) 2008
 * @version $Id$v1.0$ 2008
 * @access public
 */
class Gecko_Form_Result {
	/**
	 * Field Result
	 *
	 * @var boolean
	 */
	private $result;

	/**
	 * Field Messages (Array)
	 *
	 * @var array
	 */
	private $messages;

	/**Constructs a new Result Object
	 *
	 * @param boolean $result The Field Validation Result
	 * @param string $key The Error Key
	 */
	public function __construct( $result, $messages = null ) {
		$this->result = $result;
		$this->messages = $messages;
	}

	/**
	 * Returns the field result
	 *
	 * @return boolean The result of the field
	 */
	public function getResult() {
		return $this->result;
	}

	/**
	 * The error messages
	 *
	 * @return array with messages
	 */
	public function getMessages() {
		return $this->messages;
	}
}
?>
